package com.blog.article.service;

import com.blog.article.entity.Blog;
import com.baomidou.mybatisplus.extension.service.IService;
import com.blog.article.entity.VO.BlogVO;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 苏离
 * @since 2021-12-10
 */
public interface BlogService extends IService<Blog> {

    Map<String,Object> getBlog(Integer count);
    Map<String,Object> getBlogById(String id, Integer count);
    Map<String,Object> getBlogByTag(Integer id, Integer count);
    Map<String,Object> getBlogByTitle(String title);
    Map<String,Object> getBlog(String userId,Integer pageSize,Integer limit);
    Map<String,Object> getTags();
    Map<String,Object> getArticleById(Integer id);
    Map<String,Object> getAnyArticleById(Integer id);
    boolean createArticle(BlogVO blogVO);
    boolean updateArticle(BlogVO blogVO);
    boolean updateViews(String userId ,Integer articleId);
    boolean deleteArticle(String userId,Integer id);
    Map<String,Object> getAllBlog(Integer pageSize,Integer limit);
    Map<String,Object> getAllBlogByTitle(String title,Integer pageSize,Integer limit);
}